package event.demo1;

import javax.swing.*;
import java.awt.*;

public class ChangeColor extends JFrame {

    private JPanel p1, p2, p3;

    public ChangeColor(){
        this.setSize(500, 500);
        this.setDefaultCloseOperation(3);
        this.setLocationRelativeTo(null);
        this.setLayout(null);

        p1 = new JPanel();
        p1.setBounds(50, 50, 50, 50);
        p1.setBackground(Color.RED);



        this.add(p1);

        this.setVisible(true);
    }

    public static void main(String[] args){
        new ChangeColor();
    }
}
